#ifndef CUBE_MESH_H_
#define CUBE_MESH_H_

class Mesh : public Asset
{
DECLARE_RTTI( Mesh, Asset )
public :
	virtual ~Mesh();

	LPDIRECT3DINDEXBUFFER9			GetIndexBuffer(){ return _ib; }
	D3DPRIMITIVETYPE				GetPrimitiveType(){ return _primitiveType; }
	LPDIRECT3DVERTEXBUFFER9			GetVertexBuffer(){ return _vb; }
	LPDIRECT3DVERTEXDECLARATION9	GetVertexDeclaration(){ return _vertexDecl; }

	void							SetIndexBuffer( const  LPDIRECT3DINDEXBUFFER9 ib ){ _ib = ib; }
	void							SetPrimitiveType( const D3DPRIMITIVETYPE pt ){ _primitiveType = pt; }
	void							SetVertexBuffer( const LPDIRECT3DVERTEXBUFFER9 vb ){ _vb = vb; }
	void							SetVertexDeclaration( const LPDIRECT3DVERTEXDECLARATION9 decl ){ _vertexDecl = decl; }

	static Mesh*					Create( const std::string& name );

private :
	Mesh( const std::string& name );

	D3DPRIMITIVETYPE				_primitiveType;

	LPDIRECT3DVERTEXDECLARATION9	_vertexDecl;
	LPDIRECT3DVERTEXBUFFER9			_vb;
	LPDIRECT3DINDEXBUFFER9			_ib;
};

#endif